import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom'
import Home from './page/Home'
import Detail from './page/Detail'
import Search from './page/Search'
import Login from './page/Login'
import './App.scss'
class App extends Component {
  render() {
    return (
      <Router>
        <Switch>
          <Route path='/home' component={ Home }></Route>
          <Route path='/detail' component={ Detail }></Route>
          <Route path='/search' component={ Search }></Route>
          <Route path='/login' component={ Login }></Route>
          <Redirect from="/" to="/home/index"></Redirect>
        </Switch>
      </Router>
    );
  }
}

export default App;
